import logging
from typing import Any, Dict, List, Optional, Union

from structlog._base import BoundLoggerBase
from typing_extensions import TypeAlias

_EventDict: TypeAlias = Dict[str, Any]

class BoundLogger(BoundLoggerBase):
    def debug(self, event: Optional[Any] = ..., *args: Any, **kw: Any) -> None: ...
    def info(self, event: Optional[Any] = ..., *args: Any, **kw: Any) -> None: ...
    def warning(self, event: Optional[Any] = ..., *args: Any, **kw: Any) -> None: ...
    warn = warning
    def error(self, event: Optional[Any] = ..., *args: Any, **kw: Any) -> None: ...
    def critical(self, event: Optional[Any] = ..., *args: Any, **kw: Any) -> None: ...
    def exception(self, event: Optional[Any] = ..., *args: Any, **kw: Any) -> None: ...
    def log(self, event: Optional[Any] = ..., *args: Any, **kw: Any) -> None: ...
    fatal = critical

def filter_by_level(logger: Any, name: str, event_dict: _EventDict) -> _EventDict: ...

class PositionalArgumentsFormatter:
    def __init__(self, remove_positional_args: bool = ...) -> None: ...
    def __call__(self, _: Any, __: Any, event_dict: _EventDict) -> _EventDict: ...

class LoggerFactory:
    def __init__(
        self, ignore_frame_names: Optional[Union[List[str], str]] = ...
    ) -> None: ...
    def __call__(self, *args: Any) -> logging.Logger: ...
